// However, if @params contains a 'gicon' parameter, the passed in gicon
// will be used.
//
-// You can add a secondary icon to the banner with 'secondaryGIcon'. There
-// is no fallback for this icon.
-//
// If @params contains 'bannerMarkup', with the value %true, a subset (<b>,
// <i> and <u>) of the markup in [1] will be interpreted within @banner. If
// the parameter is not present, then anything that looks like markup
update(title, banner, params) {
params = Params.parse(params, {
gicon: null,
- secondaryGIcon: null,
bannerMarkup: false,
clear: false,
datetime: null,
if (params.gicon || params.clear)
this.gicon = params.gicon;
- if (params.secondaryGIcon || params.clear)
- this.secondaryGIcon = params.secondaryGIcon;
-
if (params.clear)
this.actions = [];
this._buttonBox = null;
this._addActions();
- this._addSecondaryIcon();
this.notification.connectObject('activated', () => {
// We hide all types of notifications once the user clicks on
super._onUpdated(n, clear);
if (clear) {
- this.setSecondaryActor(null);
this.setActionArea(null);
this._buttonBox = null;
}
this._addActions();
- this._addSecondaryIcon();
}
_addActions() {
});
}
- _addSecondaryIcon() {
- if (this.notification.secondaryGIcon) {
- const icon = new St.Icon({
- gicon: this.notification.secondaryGIcon,
- x_align: Clutter.ActorAlign.END,
- });
- this.setSecondaryActor(icon);
- }
- }
-
addButton(button, callback) {
if (!this._buttonBox) {
this._buttonBox = new St.BoxLayout({